import time
from celery import Celery

# 初始化celery的应用，指定任务存放的Redis中
app = Celery("users",
             broker="redis://127.0.0.1:6379/15")


@app.task
def send_email(a, b):
    print("正在发送中")
    time.sleep(5)
    print("邮件发送完成,正在跳转...")
    print(a, b)
    return "success"
